package com.shangxian.giveithome.mapper;


import com.shangxian.giveithome.entity.*;
import com.shangxian.giveithome.entity.community.NoticeCenter;
import com.shangxian.giveithome.entity.community.UserList;
import com.shangxian.giveithome.entity.move.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {

    /**
     * 注册
     *
     * @param user
     * @return
     */
    Long save(User user);

    /**
     * 修改角色
     *
     * @param roleUser
     */
    void updateRole(RoleUser roleUser);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    List<User> queryById(@Param("id") List<Long> id);

    /**
     * 根据openid查询用户
     *
     * @param openId
     * @return
     */
    int queryByOpenId(String openId);

    /**
     * 完善用户信息
     *
     * @param userPerfect
     */
    int perface(UserPerfect userPerfect);

    /**
     * 根据用户openid查询用户信息
     *
     * @param openId
     * @return
     */
    User queryByOpenIdUser(String openId);

    /**
     * 更新用户信息
     *
     * @param putUserFei
     */
    int updateUser(PutUserFei putUserFei);

    /**
     * 根据id查看用户简单信息
     *
     * @param id
     * @return
     */
    UserSimple queryByUserSimple(Long id);

    List<User> queryRole3();

    void createData(Long id);

    Integer queryByUuid(String uuid);

    void updateUserVolunteerTime(@Param("usId")Long usId, @Param("volunteerTime") Double volunteerTime);


//---------------------------------------
    //迁移
   List<User_copy1> selectuser_copy1();

    Long istuer(User user);

    List<Pet_copy1> setlectpet_copy1();

    Long selectopid(String publisherId);

    Long istpet(Pet pet);

    Long selectvaesid(Varieties varieties);

    Long selectid1(Pet p);
    

    void istpla(Place place);

    void istimg(Img i);

    Long selectimgid(Img i);

    String selectpathbyfilname(String fileName);

    List<Img_copy1> selectimg(String petId);

    List<Sreach_people> selectschp();

    Long selectid2(Pet s);

    List<Img_copy1>  selectSimg(String id);

    Long selectidbyimg(Long key_id);

    void istschp(SearchPeople searchPeople);

    String setpathbyfile(String fileName);

    String selectfilenamebyid(String search_id);

    List<Search_pet_copy1> selectsearchall();

    void istschpet(SearchPet searchPet);

    /**
     * 根据用户id查询用户简单信息
     * @param ids
     * @return
     */
    List<UserList> findAllUserMessageById(List<Long> ids);

    /**
     * 根据用户手机号查询用户信息
     */
    List<UserSimple> findUserMessageByTell(List<String> phone);

    /**
     * 查询用户通知中心的信息
     */
    List<NoticeCenter> findNoticeMessage(Long id,int pageNumber,int pageSize);

    /**
     * 判断用户是否为授权的医生
     * @param id
     * @return
     */
    int IsDoctor(Long id);
}
